/*
 *
 *
 */

#ifndef GKT_CRYPTO_DES_H
#define GKT_CRYPTO_DES_H

#include "gkt_types.h"

#ifdef __cplusplus
extern "C" {
#endif

#define GKT_CRYPTO_DES_KEY_BITS	64
#define GKT_CRYPTO_DES_KEY_BYTES	(GKT_CRYPTO_DES_KEY_BITS >> 3)
#define GKT_CRYPTO_DES_BLOCK_BITS	128
#define GKT_CRYPTO_DES_BLOCK_BYTES	(GKT_CRYPTO_DES_BLOCK_BITS >> 3)

int gkt_crypto_des_encrypt(gkt_crypto_mode_e mode,
			const uint8_t *key, const uint8_t *init_vector, 
			const uint8_t *plaintext, uint32_t plaintext_len,
			uint8_t *ciphertext);

int gkt_crypto_des_decrypt(gkt_crypto_mode_e mode,
			const uint8_t *key, const uint8_t *init_vector, 
			const uint8_t *ciphertext, uint32_t ciphertext_len,
			uint8_t *plaintext);


#define GKT_CRYPTO_3DES_KEY_BITS	192
#define GKT_CRYPTO_3DES_KEY_BYTES	(GKT_CRYPTO_3DES_KEY_BITS >> 3)
#define GKT_CRYPTO_3DES_BLOCK_BITS	192
#define GKT_CRYPTO_3DES_BLOCK_BYTES	(GKT_CRYPTO_3DES_BLOCK_BITS >> 3)

int gkt_crypto_3des_encrypt(gkt_crypto_mode_e mode,
			const uint8_t *key, const uint8_t *init_vector, 
			const uint8_t *plaintext, uint32_t plaintext_len,
			uint8_t *ciphertext);

int gkt_crypto_3des_decrypt(gkt_crypto_mode_e mode,
			const uint8_t *key, const uint8_t *init_vector, 
			const uint8_t *ciphertext, uint32_t ciphertext_len,
			uint8_t *plaintext);

#ifdef __cplusplus
}
#endif

#endif	/* GKT_CRYPTO_DES_H */


